#pragma once

#include "CogTest.h"
#include "CogAnt.h"

// ------------------------------------------------------------------------------------------

class CogRegister
{
public:
	static CogEvaluator* create(const string& name, const string& parameters);
};

// ---------

CogEvaluator* CogRegister::create(const string& name, const string& parameters)
{
	if (name == "cache")
	{
		return new CogCacheEvaluator();
	}
	else
	if (name == "terminals")
	{
		return new CogTESizeEvaluator();
	}
	else
	if (name == "nonterminals")
	{
		return new CogNTSizeEvaluator();
	}
	else if (name == "6thorder")
	{
		return new Cog6thOrderEvaluator(parameters);
	}
	else
	if (name == "age")
	{
		return new CogAgeEvaluator();
	}
	else
	if (name == "bin3")
	{
		return new CogBinomialEvaluator(parameters);
	}
	else if (name == "quartic")
	{
		return new CogQuarticEvaluator(parameters);
	}
	else if (name == "quintic")
	{
		return new CogQuinticEvaluator(parameters);
	}
	else if (name == "multiplex")
	{
		return new CogMultiplexerEvaluator(parameters);
	}
	else if (name == "parity")
	{
		return new CogParityEvaluator(parameters);
	}
	else if (name == "sfant")
	{
		return new CogAntEvaluator();
	}
	else
	{
		return NULL;
	}
}

// ------------------------------------------------------------------------------------------
